package com.xiaoyu.lanling.event.location

import `in`.srain.cube.request.JsonData
import `in`.srain.cube.util.StringUtil
import com.xiaoyu.base.event.BaseJsonEvent

class AddressEvent(requestTag: Any, jsonData: JsonData) : BaseJsonEvent(requestTag, jsonData) {

    val province: String = jsonData.optString("province")
    val city: String = jsonData.optString("city")
    val county: String = jsonData.optString("county")

    val isValidLocation: Boolean
        get() = !StringUtil.isAnyEmpty(province, city, county)

}